package com.zsx.shopping.order.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 订单项
 * @TableName oms_order_item
 */
@TableName(value ="oms_order_item")
@Data
public class OrderItem implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 所属订单ID
     */
    private Long orderId;

    /**
     * 商品ID
     */
    private Long skuId;

    /**
     * 商品名称
     */
    private String skuName;

    /**
     * 商品图片
     */
    private String skuImage;

    /**
     * 商品价格
     */
    private BigDecimal skuPrice;

    /**
     * 商品销售属性
     */
    private String skuSaleAttrs;

    /**
     * 购买数量
     */
    private Integer skuCount;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}